<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}--手机站</title>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="Cache-Control" content="no-cache;must-revalidate" />
        <meta http-equiv="expires" content="0" />
        <meta name="keywords" content="中国小姐,世界小姐,世界小姐中国区,新丝路,新丝路时尚" />
        <meta name="description" content="中国小姐,世界小姐,世界小姐中国区,新丝路,新丝路时尚"/>
        <link rel="stylesheet" type="text/css" href="{JS_PATH}/nsrmodel_h5/css/xsl_lc_m.css">
        <link href="{JS_PATH}/nsrmodel_h5/css/reset.css" type="text/css" rel="stylesheet"/>
        <link href="{JS_PATH}/nsrmodel_h5/css/list_templet.css" type="text/css" rel="stylesheet"/>
        <script src="{JS_PATH}/nsrmodel_h5/js/jquery.1.7.2.min.js"></script>
        <script src="{JS_PATH}/nsrmodel_h5/js/html_reset.js"></script>
        <link rel="stylesheet" type="text/css" href="{JS_PATH}/nsrmodel/css/swiper.min.css">
    </head>
    <body>
        {template "content_h5","header"}
        <div class="top-area">
            <img class="banner" src="http://m.nsr.com.cn/resource/uploadfile/column_icon/m21.jpg" />
        </div>
        <div class="nav">
            <p>
                {pc:content action="category" catid="$catid" num="25" siteid="$siteid" order="listorder ASC"}
                {loop $data $k $r}
                {if $r['catid'] != 151 && $r['catid'] != 153 && $r['catid'] != 154}
                <a href="/index.php?m=content&c=index&a=lists&catid={$r['catid']}" {if $r['catid'] == $child_id}class="active"{/if}>{$r['catname']}</a>{if $r['catid'] != 152}<span>|</span>{/if}
                {/if}
                {/loop}
                {/pc}
            </p>  
        </div>
        <div class="wrapper">
            {pc:content  action="lists" catid="157" siteid="$siteid" type="1" page="$page" num="10"}
            <div class="edulist">
                {loop $data['returnList'] $r}
                <div class="singleLi">
                    <a href="/index.php?m=content&c=index&a=show&type={$r['type']}&catid=157&id={$r['id']}">
                        <div class="train-pic">
                            <img src="{$r[image]}" />
                        </div>
                        
                        <h3>{$r[title]}</h3>
                        <p>{$r['infoBrief']}</p>
                    </a>
                </div>
                {/loop}
            </div>
            {/pc}
        <input type="hidden" name="page" value="2" />
        </div>
        {template "content_h5","footer_index"}
        <script type="text/javascript">
            //上拉刷新
            $(function(){
              var tag = 1;
              var nums = $('.edulist .singleLi').size();
              if (nums != 10) {
                tag = 0;
                $('#game_jzwc').show();
              }
              $(window).scroll(function(){  
                // 被卷去的高度  
                var scrollTop = document.body.scrollTop||document.documentElement.scrollTop;  
                // 页面高度  
                var pageHeight = $(document).height();  
                // 可视区域高度  
                var viewHeight = $(window).height();  
                //alert(viewHeight);  
                //当滚动到底部时
                if((scrollTop+viewHeight)>(pageHeight-20) && tag == 1){
                  tag = 0;
                var catid= 157;
                var page= $("input[name='page']").val();
                var pagesize= 10;
                  $.ajax({
                    type: "POST",
                    url: "index.php?m=content&c=rjson&a=apiList",
                    cache: false,
                    dataType:"json",
                    data: {catid:catid, page:page, pagesize:pagesize},
                    success: function(result){
                      if (result.code == 'R0000000') {
                        if (result['data']['returnList'].length == 10) {
                          $("input[name='page']").val(parseInt(page)+parseInt(1));
                          tag = 1;
                        } else {
                          tag = 0;
                        }
                        var jsonobj =  result['data']['returnList']; 
                        var _html = '';
                          for(key in jsonobj){
                              _html +='<div class="singleLi"><a href="';
                              _html +='/index.php?m=content&c=index&a=show&type='+jsonobj[key]['type']+'&catid='+catid+'&id='+jsonobj[key]['id'];
                              _html +='"><img src="';
                              _html +=jsonobj[key]['image']; 
                              _html +='" /><h3>';
                              _html +=jsonobj[key]['title'];
                              _html +='</h3><p>';
                              _html +=jsonobj[key]['infoBrief'];
                              _html +='</p></a></div>';
                          }
                         $(".edulist").append(_html);
                      } else {
                        tag = 0;
                      }
                    },
                    error: function(){
                      alert('请求服务器失败');
                    }
                  }); 
                  //防止无限制的增长
                  if(scrollTop<5000){  
                    return false;     
                  }  
                }  
              });
            })
        </script>
    </body>
</html>